import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Event from '@/components/Event'
import formdata from '@/components/formdata'
import style from '@/components/style'
import Parent from '@/components/sonparent/parent'
import Parents from '@/components/slots/parents'
import Big from '@/components/comkeep/big'
import Anim from '@/components/anim/anim'
import Directive from '@/components/directive'
import Filter from '@/components/filter'
import Get from '@/components/get'
import Post from '@/components/post'
import NavList from '@/components/NavList'
import Element from '@/components/element'
import Lazyload from '@/components/lazyload'
import HelloRem from '@/components/helloRem'

Vue.use(Router)
// history.back(); //慎用
export default new Router({
  mode:"history",
  routes: [
    // {
    //   path: '/',
    //   name: 'HelloWorld',
    //   component: HelloWorld
    // },
    {
      path: '/',
      name: 'HelloRem',
      component: HelloRem
    },
    {
      path: '/Filter',
      name: 'Filter',
      component: Filter,
      redirect:'/Filter/style',
      children: [
        {
          path: 'big',
          name: 'big',
          component: Big
        },
        {
          path: 'style',
          name: 'style',
          component: style
        }
      ]
    },
    {
      path: '/Event',
      name: 'Event',
      component: Event
    },
    {
      path: '/Directive/:count',
      name: 'Directive',
      component: Directive
    }
  ]
})
